import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:online_study/base/course_search_item.dart';
import 'package:online_study/classify/course_item.dart';
import 'package:online_study/course/course_detail.dart';
import 'package:online_study/theme/size.dart';

class CategoryContentPage extends StatefulWidget {
  @override
  _CategoryContentPageState createState() => _CategoryContentPageState();
}

class _CategoryContentPageState extends State<CategoryContentPage> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        CourseSearchPage(),
        Expanded(
            child: ListView.separated(
          itemBuilder: (BuildContext context, int index) {
            return GestureDetector(
              child: CourseItemPage(false),
              onTap: () {
                Get.to(() => CourseDetailPage());
              },
            );
          },
          separatorBuilder: (BuildContext context, int index) {
            return Divider(height: ThemeSize.width1);
          },
          itemCount: 10,
          shrinkWrap: true,
        ))
      ],
    );
  }
}
